import request from '@/utils/request'

export const getPermission = () => request.get('/sys/permission')

export const newPermission = data => request.post('/sys/permission', data)

export const updatePermission = data => request.put(`/sys/permission/${data.id}`, data)

export const delPermission = id => request.delete(`/sys/permission/${id}`)

export const getOnePermissionList = id => request.get(`/sys/permission/${id}`)

export const assignPermission = data => request.put('/sys/role/assignPrem', data)
